/**
 * VMIX HTTP based API interface
 */
package com.vmix.android.vmixsdk.util.http;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;

import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpRequestBase;

/**
 * @author lei
 *
 */
public interface IHttpApi
{
	/**
	 * Abstract method for requesting using IHttpApi
	 * 
	 * @param httpRequest
	 * @return
	 * @throws IOException
	 */
	abstract public HttpResponse executeHttpRequest(HttpRequestBase httpRequest) throws IOException;
	
	/**
	 * Abstract method for building HttpGet
	 * @param url
	 * @param nameValuePairs
	 * @return
	 */
	abstract public HttpGet buildHttpGet( String url, NameValuePair... nameValuePairs );
	
	/**
	 * Abstract method for build HttpPost
	 * 
	 * @param url
	 * @param nameValuePairs
	 * @return
	 */
	abstract public HttpPost buildHttpPost (String url, NameValuePair... nameValuePairs );
	
	abstract public HttpURLConnection createHttpURLConnectionPost(URL url, String boundary) throws IOException; 
}
